Skip to content

ML-DSA signing scheme for TUF metadata - #195

Merged
mnm678 merged 6 commits into
theupdateframework:masterfrom
kommendorkapten:pqc
Jul 29, 2026
Merged

ML-DSA signing scheme for TUF metadata#195
mnm678 merged 6 commits into
theupdateframework:masterfrom
kommendorkapten:pqc

Conversation

@kommendorkapten

Copy link
Copy Markdown
Member

Wrote up a TAP on how to encode ML-DSA keys when used within TUF and added a section on pre-auth encoding as certain targets can be fairly larger, and ML-DSA operates in pure mode, that is, no pre-hashing which is the case for RSA and ECDSA.

Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
@kommendorkapten kommendorkapten changed the title First draft of ml-dsa signing scheme. ML-DSA signing scheme for TUF metadata May 4, 2026
Comment thread tap21.md
Comment thread tap21.md
mnm678
mnm678 previously approved these changes May 4, 2026

@mnm678 mnm678 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few minor comments, but overall I think this is a great scheme, and addresses some of the performance concerns around ML-DSA

@Hayden-IO Hayden-IO left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic!

Comment thread tap21.md
Comment thread tap21.md
Comment thread tap21.md
Comment thread tap21.md
Comment thread tap21.md Outdated
Comment thread tap21.md
Comment thread tap21.md Outdated
Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
@kommendorkapten

Copy link
Copy Markdown
Member Author

Thanks for the feedback ❤️
All comments should be adressed/answered. See https://github.com/kommendorkapten/taps/blob/pqc/tap21.md for a rendered version.

@Hayden-IO Hayden-IO left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great work on this spec!

mnm678
mnm678 previously approved these changes May 6, 2026
kipz added a commit to kipz/tuf-spec-explorer that referenced this pull request May 6, 2026
TAP 21 is in active draft (PR theupdateframework/taps#195) and adds an
ml-dsa keytype with FIPS 204 parameter sets plus an application-level
pre-hashing protocol so HSMs can sign large TUF metadata in pure mode.

Also bump README counts from 14 to 15 toggleable TAPs.

@jku jku left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Left one question

Comment thread tap21.md
jku added a commit to jku/securesystemslib that referenced this pull request May 12, 2026
This is related to proposed TAP:
theupdateframework/taps#195

This currently enables the key for verification and signing for easier
testing: In reality we may want to leave the verify support disabled
until the TAP is approved.

This makes cryptography 48 a requirement
* we could make this more complicated with a separate feature
  but I'm not going to unless someone has a good reason for it
* ML-DSA support was added in 47 already but support via openssl
  only became available in 48

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
jku added a commit to jku/securesystemslib that referenced this pull request May 12, 2026
This is related to proposed TAP:
theupdateframework/taps#195

This currently enables the key for verification and signing for easier
testing: In reality we may want to leave the verify support disabled
until the TAP is approved.

This makes cryptography 48 a requirement
* we could make this more complicated with a separate feature
  but I'm not going to unless someone has a good reason for it
* ML-DSA support was added in 47 already but support via openssl
  only became available in 48

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku

jku commented May 19, 2026

Copy link
Copy Markdown
Member

For testing: https://jku.github.io/pqc-test-repo/metadata/ is a live repository with ML-DSA-44 online keys that should match this proposal

@JustinCappos

Copy link
Copy Markdown
Member

with ML-DSA-44 online keys

Note for anyone else who is glancing quickly at this early in the AM, only the snapshot / timestamp keys are ML-DSA-44, as I should have expected from the use of the word online. 😆

We probably should list some ballpark numbers in the TAP for the metadata size (key / sig size differences) and signing / verification time differences.

@kommendorkapten

Copy link
Copy Markdown
Member Author

Yeah, I can add that.

@jku

jku commented May 26, 2026

Copy link
Copy Markdown
Member

TUF Metadata Size Analysis: ECDSA to ML-DSA Transition

This uses the sigstore repository as an example (5 root/targets keys, 1 timestamp/snapshot key).

Note that I did not actually create a working repository like this: this result comes from a script that calculates the sizes, script is made by an AI -- I've made point verifications but feel free to do you own homework.

TUF Role Keys Sigs ECDSA Size ML-DSA-44 Size (% Increase) ML-DSA-65 Size (% Increase) ML-DSA-87 Size (% Increase)
root 6 5 5,630 B 39,326 B (+598.5%) 53,406 B (+848.6%) 71,968 B (+1,178.3%)
targets 1 5 4,942 B 30,133 B (+509.7%) 39,813 B (+705.6%) 53,965 B (+992.0%)
timestamp 0 1 447 B 5,147 B (+1,051.5%) 6,907 B (+1,445.2%) 9,561 B (+2,038.9%)
snapshot 0 1 1,760 B 6,458 B (+266.9%) 8,218 B (+366.9%) 10,872 B (+517.7%)
registry.npmjs.org 0 1 642 B 5,338 B (+731.5%) 7,098 B (+1,005.6%) 9,752 B (+1,419.0%)

For this specific case the timestamp growth is the most worrying: that is the only file that every single client downloads constantly.

The table is based on these estimates:

Public keys:

  • ECDSA: DER size= 91 bytes. PEM size = 178 bytes. On-disk size inside JSON literal = 180 bytes.
  • ML-DSA-44: DER size= 1334 bytes. PEM size = 1,860 bytes. On-disk size inside JSON literal = 1,888 bytes.
  • ML-DSA-65: DER size= 1974 bytes. PEM size = 2,726 bytes. On-disk size inside JSON literal = 2,768 bytes.
  • ML-DSA-87: DER size= 2614 bytes. PEM size = 3,595 bytes. On-disk size inside JSON literal = 3,650 bytes.

signatures

  • ECDSA:_ 140 hex characters
  • ML-DSA-44: 4,840 hex characters
  • ML-DSA-65: 6,600 hex characters
  • ML-DSA-87: 9,254 hex characters

Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
@kommendorkapten

Copy link
Copy Markdown
Member Author

Updated with three summary tables on the expected growth from ECDSA inspired by @jku's comment.

@JustinCappos JustinCappos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the TUF community meeting today, we think this is in sufficient state to merge as a draft / assign TAP number 21 to this.

@JustinCappos
JustinCappos requested a review from mnm678 June 3, 2026 14:13
@JustinCappos
JustinCappos requested a review from lukpueh June 3, 2026 14:16
jku added a commit to jku/securesystemslib that referenced this pull request Jun 28, 2026
This is related to proposed TAP:
theupdateframework/taps#195

This currently enables the key for verification and signing for easier
testing: In reality we may want to leave the verify support disabled
until the TAP is approved.

This makes cryptography 48 a requirement
* we could make this more complicated with a separate feature
  but I'm not going to unless someone has a good reason for it
* ML-DSA support was added in 47 already but support via openssl
  only became available in 48

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@Hayden-IO

Copy link
Copy Markdown

Just wanted to check in on the status of getting this merged.

@JustinCappos

JustinCappos commented Jul 28, 2026 via email

Copy link
Copy Markdown
Member

@mnm678

mnm678 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This is ready to merge as a draft. Once theupdateframework/go-tuf#758 moves forward we can also look at getting this TAP accepted.

@mnm678
mnm678 merged commit 3820809 into theupdateframework:master Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants